﻿$(function() {
  $("#msg").after("<a href='javascript:void(0)' onclick='reply()' title='设置回复可见'> [设置回复可见]</a>");
});
function reply(){
  var ueObj=UE.getEditor('editor_txt');
  var range = ueObj.selection.getRange();
  range.select();
  var txt = ueObj.selection.getText();
  if (txt != ""){
    var value = "[reply]"+txt+"[/reply]";
  }else{
    var value = "<p>[reply]这里插入要隐藏的内容，可以分段[/reply]</p>";
  }
  ueObj.execCommand('insertHtml', value);
}